﻿function Validate() {

    var obj_txtVoucherNo = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_txtVoucherNo_I');
   
    var obj_cmbWarehouse = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_cmbWarehouse_I');
    var obj_cmbBranch = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_cmbBranch_I');
    var obj_txtCustomerName = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_txtCustomerName_I');
    var obj_txtAddress1 = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_txtAddress1_I');
    var obj_txtCity = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_txtCity_I');
    var obj_cmbArea_I = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_cmbArea_I');
    var obj_txtModelCode = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_txtModelCode_I');
    var obj_txtModelType = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_txtModelType_I');
    var obj_txtItemDescription = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_txtItemDescription_I');
    var obj_txtQuantity = document.getElementById('ctl00_ctl00_ASPxSplitter1_Content_ContentSplitter_MainContent_txtQuantity_I');

    if (obj_txtVoucherNo.value == "") {
        alert('Kindly Specify Voucher No.')
        obj_txtVoucherNo.focus();
        return false;
    }
    
    if (obj_cmbWarehouse.value == "--Select--") {
        alert('Kindly Select Warehouse.')
        obj_cmbWarehouse.focus();
        return false;
    }
    if (obj_cmbBranch.value == "--Select--") {
        alert('Kindly Select Branch.')
        obj_cmbBranch.focus();
        return false;
    }
    if (obj_txtCustomerName.value == "") {
        alert('Kindly Specify Customer Name.')
        obj_txtCustomerName.focus();
        return false;
    }
    if (obj_txtAddress1.value == "") {
        alert('Kindly Specify Address.')
        obj_txtAddress1.focus();
        return false;
    }
    if (obj_txtCity.value == "") {
        alert('Kindly Specify Area.')
        obj_txtCity.focus();
        return false;
    }
    if (obj_cmbArea_I.value == "--Select--") {
        alert('Kindly Select Area.')
        obj_cmbArea_I.focus();
        return false;
    }
    if (obj_txtModelCode.value == "") {
        alert('Kindly Specify Model Code.')
        obj_txtModelCode.focus();
        return false;
    }
    if (obj_txtModelType.value == "") {
        alert('Kindly Specify Model Type.')
        obj_txtModelType.focus();
        return false;
    }
    if (obj_txtItemDescription.value == "") {
        alert('Kindly Specify Item Description.')
        obj_txtItemDescription.focus();
        return false;
    }
    if (obj_txtQuantity.value == "") {
        alert('Kindly Specify Quantity.')
        obj_txtQuantity.focus();
        return false;
    }
    

    return true;
}